<!--
 * @Description: 文件的导入
 * @Author: zy
 * @Date: 2021-03-31 16:53:30
 * @LastEditors: zy
 * @LastEditTime: 2021-04-02 16:48:39
-->
<template>
    <div class = 'box'>
        <el-upload
    ref="upload"
    :limit="1"
    :before-upload="beforeUpload"
    :auto-upload="false"
    :headers="headers"
    :on-success="handleSuccess"
    :on-error="handleError"
    :action=" 'localhost:8080/api/localstorage' + '?name=' + filename" >
    <div><i class="el-icon-upload" /> 添加文件</div>
    <div slot="tip" class="el-upload__tip">可上传任意格式文件，且不超过100M</div>
  </el-upload>
  <el-button :loading="loading" type="primary" @click="upload">确认上传</el-button>
    </div>
</template>
<script>
export default {
  name: 'Impor'
}
</script>
<style>
.box {
    margin-top: 60px;
}
</style>
